import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

/// 横线
class YpLine extends StatelessWidget {
  /// 起点缩进距离
  final double indent;

  /// 终点缩进距离
  final double endIndent;

  /// 分割线区域的高度，并非分割线的高度
  final double height;

  /// 分割线的厚度，真正的分割线的高度
  final double thickness;

  /// 分割线颜色
  final Color color;

  const YpLine({
    this.indent = 0,
    this.endIndent = 0,
    this.height = 1,
    this.thickness = 1,
    this.color = const Color(0xFFefefef),
    Key key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Divider(
        indent: indent,
        endIndent: endIndent,
        height: height.w,
        thickness: thickness.w,
        color: color);
  }
}

